import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'Index',
            meta: {
                title: '摄享万山|2018珠海海岛摄影大赛'
            },
            component: () => import('@/pages/index').then(m => m.default)
        },
        {
            path: '/2',
            name: 'Index2',
            meta: {
                title: '2018漫享万山最美海岛设施评选'
            },
            component: () => import('@/pages/index2').then(m => m.default)
        },
        {
            path: '/enroll',
            name: 'EnRoll',
            meta: {
                title: '报名'
            },
            component: () => import('@/pages/enroll').then(m => m.default)
        },
        {
            path: '/activity',
            name: 'Activity',
            meta: {
                title: '活动列表'
            },
            component: () => import('@/pages/activity').then(m => m.default)
        },
        {
            path: '/activity/:activityId',
            name: 'ActivityPic',
            meta: {
                title: '活动详情'
            },
            component: () => import('@/pages/longpic').then(m => m.default)
        },
        {
            path: '/activity/:activityId/catalogs',
            name: 'Catalog',
            component: () => import('@/pages/catalog').then(m => m.default),
            meta: {
                keepAlive: false,
                title: '类别'
            }
        },
        {
            path: '/vote/:activityId',
            name: 'Vote',
            meta: {
                title: '作品展'
            },
            component: () => import('@/pages/vote').then(m => m.default)
        },
        {
            path: '/vote/activity/:activityId/catalog/:catalogId',
            name: 'VoteManual',
            meta: {
                title: '投票',
                keepAlive: false
            },
            component: () => import('@/pages/voteManual').then(m => m.default)
        }
    ]
})
